home *** CD-ROM | disk | FTP | other *** search
/ Champak Vol E-14 / Vol E-14.iso / games / reelgold.swf / scripts / DefineSprite_106 / frame_1 / DoAction.as
Text File  |  2014-03-11  |  5KB  |  205 lines

  1. function fSJxxx(tVal)
  2. {
  3.    var _loc1_ = tVal;
  4.    if(_loc1_ != pJMode)
  5.    {
  6.       switch(_loc1_)
  7.       {
  8.          case "on":
  9.             if(pOn == true)
  10.             {
  11.                sJetOn.onSoundComplete = function()
  12.                {
  13.                   sJetLoop.start(0,99);
  14.                };
  15.                sJetOn.setVolume(70);
  16.                sJetOn.start(0,1);
  17.                pJMode = _loc1_;
  18.             }
  19.             break;
  20.          case "off":
  21.             sJetLoop.stop();
  22.             if(pOn == true)
  23.             {
  24.                sJetOff.setVolume(70);
  25.                sJetOff.start(0,1);
  26.                pJMode = _loc1_;
  27.             }
  28.       }
  29.    }
  30. }
  31. function fNoise(which)
  32. {
  33.    var _loc1_ = which;
  34.    if(pOn == true)
  35.    {
  36.       if(_loc1_ == "click")
  37.       {
  38.          sTink.start();
  39.       }
  40.       else if(_loc1_ == "fire")
  41.       {
  42.          sFire.start();
  43.       }
  44.       else if(_loc1_ == "twang")
  45.       {
  46.          sTwang.start();
  47.       }
  48.       else if(_loc1_ == "pick")
  49.       {
  50.          sTink2.start();
  51.       }
  52.       else if(_loc1_ == "hit")
  53.       {
  54.          sTink3.start();
  55.       }
  56.       else if(_loc1_ == "pickhit")
  57.       {
  58.          sTink3.start();
  59.          sFall.start();
  60.       }
  61.       else if(_loc1_ == "pickup")
  62.       {
  63.          sPickup2.start();
  64.       }
  65.       else if(_loc1_ == "newgold")
  66.       {
  67.          sPickup.start();
  68.       }
  69.       else if(_loc1_ == "end")
  70.       {
  71.          sEndMusic.start();
  72.       }
  73.       else if(_loc1_ == "bell")
  74.       {
  75.          sCowbell.start();
  76.       }
  77.    }
  78. }
  79. function sWinMusic()
  80. {
  81.    if(pOn == true)
  82.    {
  83.       sDrums.stop();
  84.       sLoop.stop();
  85.       sLose.stop();
  86.       sWin.stop();
  87.       sWin.start();
  88.    }
  89. }
  90. function sLoseMusic()
  91. {
  92.    if(pOn == true)
  93.    {
  94.       sDrums.stop();
  95.       sLoop.stop();
  96.       sLose.stop();
  97.       sWin.stop();
  98.       sLose.start();
  99.    }
  100. }
  101. function sMusic()
  102. {
  103.    if(pOn == true)
  104.    {
  105.       sReelGoldLoop.stop();
  106.       sReelGoldLoop.setVolume(100);
  107.       sReelGoldLoop.start();
  108.       sReelGoldLoop.onSoundComplete = function()
  109.       {
  110.          sReelGoldLoop.start();
  111.       };
  112.    }
  113. }
  114. function sStopMusic()
  115. {
  116.    if(pOn == true)
  117.    {
  118.       sReelGoldLoop.stop();
  119.    }
  120. }
  121. function fMainSoundSwitch(which)
  122. {
  123.    var _loc1_ = _root;
  124.    if(which == "on")
  125.    {
  126.       pOn = true;
  127.       if(_loc1_.pSection == "menu")
  128.       {
  129.          sMusic();
  130.       }
  131.       else if(_loc1_.pSection != "game")
  132.       {
  133.          if(_loc1_.pSection == "ready")
  134.          {
  135.             sDrumsMusic();
  136.          }
  137.       }
  138.    }
  139.    else
  140.    {
  141.       sStopMusic();
  142.       pOn = false;
  143.    }
  144. }
  145. pOn = true;
  146. this.createEmptyMovieClip("insCowbell",1);
  147. var sCowbell = new Sound(this.insCowbell);
  148. sCowbell.attachSound("sCowbell.wav");
  149. sCowbell.setVolume(100);
  150. this.createEmptyMovieClip("insFire",2);
  151. var sFire = new Sound(this.insFire);
  152. sFire.attachSound("sFire.wav");
  153. sFire.setVolume(100);
  154. this.createEmptyMovieClip("insTink",3);
  155. var sTink = new Sound(this.insTink);
  156. sTink.attachSound("sTink.wav");
  157. sTink.setVolume(100);
  158. this.createEmptyMovieClip("insTink2",4);
  159. var sTink2 = new Sound(this.insTink2);
  160. sTink2.attachSound("sTink2.wav");
  161. sTink2.setVolume(100);
  162. this.createEmptyMovieClip("insTink3",5);
  163. var sTink3 = new Sound(this.insTink3);
  164. sTink3.attachSound("sTink3.wav");
  165. sTink3.setVolume(100);
  166. this.createEmptyMovieClip("insTwang",6);
  167. var sTwang = new Sound(this.insTwang);
  168. sTwang.attachSound("sTwang.wav");
  169. sTwang.setVolume(100);
  170. this.createEmptyMovieClip("insReelGoldLoop",7);
  171. var sReelGoldLoop = new Sound(this.insReelGoldLoop);
  172. sReelGoldLoop.attachSound("sReelGoldLoop.wav");
  173. sReelGoldLoop.setVolume(100);
  174. this.createEmptyMovieClip("insPickup",8);
  175. var sPickup = new Sound(this.insPickup);
  176. sPickup.attachSound("sPickup.wav");
  177. sPickup.setVolume(45);
  178. this.createEmptyMovieClip("insFall",9);
  179. var sFall = new Sound(this.insFall);
  180. sFall.attachSound("sFall.wav");
  181. sFall.setVolume(100);
  182. this.createEmptyMovieClip("insEndMusic",10);
  183. var sEndMusic = new Sound(this.insEndMusic);
  184. sEndMusic.attachSound("sEndMusic.wav");
  185. sEndMusic.setVolume(100);
  186. this.createEmptyMovieClip("insJetLoop",11);
  187. var sJetLoop = new Sound(this.insJetLoop);
  188. sJetLoop.attachSound("JetLoop2.wav");
  189. sJetLoop.setVolume(100);
  190. this.createEmptyMovieClip("insJetOn",12);
  191. var sJetOn = new Sound(this.insJetOn);
  192. sJetOn.attachSound("JetStart.wav");
  193. sJetOn.setVolume(100);
  194. this.createEmptyMovieClip("insJetOff",13);
  195. var sJetOff = new Sound(this.insJetOff);
  196. sJetOff.attachSound("JetFinish.wav");
  197. sJetOff.setVolume(100);
  198. this.createEmptyMovieClip("insPickup2",14);
  199. var sPickup2 = new Sound(this.insPickup2);
  200. sPickup2.attachSound("sPickup2.wav");
  201. sPickup2.setVolume(100);
  202. pJMode = "off";
  203. pOn = true;
  204. stop();
  205.